<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta http-equiv="X-UA-Compatible" content="ie=edge">
	<title>线上笔试答题系统</title>
	<link rel="stylesheet" href="./styles/css/common.css">
	<link rel="stylesheet" href="./styles/css/index.css">
</head>

<body class="dimension">
	<script src="http://rsj.beijing.gov.cn/images/rsj_header.js"></script>
	<include src="./include/header.html"></include>

	<div class="wrap">
		<!-- 公用.com-nav 头部框-->
		<div class="clearfix" id="nav_wrap">
			<script type="text/html" id="nav_tem">
				<%if(data.executeResult == 1){%>
				<% var _data = data.grwdlb%>
				<div class="com-nav">
					<img src="./styles/images/fanhui.png" class="fh" alt="">
					<div class="job-information">
						<span class="company ellipsis" title="<%=_data.dwmc%>"><%=_data.dwmc%></span>
						<span class="job ellipsis" title="<%=_data.gwmc%>"><%=_data.gwmc%></span>
					</div>
					<div class="information-msg">
						<span class="left">进度：<b><%=_data.ywcwds%></b>/<%=_data.gwwds%></span>
						<span class="right">答题时间：剩余<b><%=_data.syts%></b>天</span>
					</div>
				</div>
				<!-- 内容区域 -->
				<div class="dimension-content clearfix">
					<div class="dimension-left left">
						<% var data_ = data.grdtwd%>
						<%for(var i=0;i<data_.length;i++){%>
						<% var _item = data_[i]%>



						<%if(_item.sfkydt=='1'){%>
						<div class="dimension-item">
							<div class="cate clearfix">
								<p class="wd-name left ellipsis" title="<%=_item.gwwdmc%>"><%=_item.gwwdmc%></p>
								<span class="wd-jd right"><b class="num"><%=_item.ydtjd%></b>/<%=_item.dtzjd%></span>
							</div>
							<div class="ans clearfix">
								<p class="left ellipsis" title="进阶题">进阶题</p>

								<!-- 试卷类型 01-填空 02-论述 03-单选  岗位维度         抽取批次编号    0：点击开始答题，1：点击上一步，2：点击下一步 当前页数  自选维度级别-->

								<span class="right ans-start" sjlx="<%=_item.sjlx%>" gwwd="<%=_item.gwwd%>" cqpcbh="<%=_item.cqpcbh%>"
									tmcxfs="0" dqys="" zxwdjb="<%=_item.qwwdjb%>" gwwhid="<%=_item.gwwhid%>">开始</span>

							</div>
						</div>
						<%}else{%>
						<div class="dimension-item overActive">
							<div class="cate clearfix">
								<p class="wd-name left ellipsis" title="<%=_item.gwwdmc%>"><%=_item.gwwdmc%></p>
								<span class="wd-jd right"><b class="num"><%=_item.ydtjd%></b>/<%=_item.dtzjd%></span>
							</div>
							<div class="ans clearfix">
								<p class="left ellipsis" title="进阶题">进阶题</p>
								<span class="right ans-over show">已答完</span>

							</div>
						</div>
						<%}%>
					
				<%}%>

					</div>
					<div class="dimension-right right">
						<img src="./styles/images/wxtsbj.png" alt="">
						<div class="wxts-msg">
							<span class="left">1、</span>
							<p class="left">按照A/B/C/D/ E/F，从C级进入答对2题升为B级再选三题，对3题晋升为A级。C级进入做错2题进入D级，再选三题错两题进入E，对两题认定为当前等级。</p>
						</div>
						<div class="wxts-msg">
							<span class="left">2、</span>
							<p class="left">同一维度的题目不同单位中只能作答一次，请谨慎作答。</p>
						</div>
						<div class="wxts-msg">
							<span class="left">3、</span>
							<p class="left">每套题目都有时间限制，如果到截止时间没有答完，自动确认提交。</p>
						</div>
					</div>
				</div>
				<%}%>
0
			</script>
		</div>
	</div>
	<script src="http://rsj.beijing.gov.cn/footer.js"></script>

	<script src="./common/vendor.js"></script>
	<script src="./common/common.js"></script>
	<script>
		$(function () {
			// sessionStorage.removeItem("ksdt")
			var gwwhid = $.paramObj() && $.paramObj().gwwhid;
			var Load = new $.Loading();
			// 关闭弹框
			$(document).on("click", ".Close", function () {
				$(".Fixed").hide()
			})
			$(document).on("click", ".fh", function () {
				window.location.href = './index.html'
			})


			$(document).on('click', '.ans-start', function () {
				var zxwdjb = $(this).attr("zxwdjb");

				var gwwd = $(this).attr("gwwd"); //岗位维度
				var cqpcbh = $(this).attr("cqpcbh"); //抽取批次编号 
				var tmcxfs = $(this).attr("tmcxfs") // 0：点击开始答题，1：点击上一步，2：点击下一步
				var dqys = $(this).attr("dqys"); // 当前页数
				var zxwdjb = $(this).attr("zxwdjb"); //自选维度级别
				var sjlx = $(this).attr("sjlx") //试卷类型 01-填空 02-论述 03-单选
				var gwwhid = $(this).attr("gwwhid"); //岗位维护ID
				$(".but_qr").attr("gwwd", gwwd);
				$(".but_qr").attr("cqpcbh", cqpcbh);
				$(".but_qr").attr("tmcxfs", tmcxfs);
				$(".but_qr").attr("dqys", dqys);
				$(".but_qr").attr("sjlx", sjlx);
				$(".but_qr").attr("gwwhid", gwwhid);
				$.layerMsg('所有维度在三个月内个人只能答一次，且答题时间为一小时，超过一小时则不能继续答题，是否同意？', [{
						text: '是',
						cb: function () {
							// 弹框 论述题有弹框
							if (gwwd == 01 || gwwd == 02) {
								if (gwwd == 01) {
									if (zxwdjb == "F") {
										//   自选级别为F---填空 // 其他情况为论述页面 问答
										window.location.href = "./blank.html?gwwd=" + gwwd + "&cqpcbh=" + cqpcbh + "&tmcxfs=" +
											tmcxfs +
											"&dqys=" + dqys + "&zxwdjb=" + zxwdjb + "&gwwhid=" + gwwhid;
									} else {
										window.location.href = "./express.html?gwwd=" + gwwd + "&cqpcbh=" + cqpcbh +
											"&tmcxfs=" + tmcxfs +
											"&dqys=" + dqys + "&zxwdjb=" + zxwdjb + "&gwwhid=" + gwwhid;
									}
								} else if (gwwd == 02) {
									//  全部跳论述题
									window.location.href = "./express.html?gwwd=" + gwwd + "&cqpcbh=" + cqpcbh + "&tmcxfs=" +
										tmcxfs +
										"&dqys=" + dqys + "&zxwdjb=" + zxwdjb + "&gwwhid=" + gwwhid;
								}
							} else if (gwwd == 07) {
								window.location.href = "./txbj.html?gwwd=" + gwwd + "&cqpcbh=" + cqpcbh +
									"&tmcxfs=" + tmcxfs +
									"&dqys=" + dqys + "&zxwdjb=" + zxwdjb + "&gwwhid=" + gwwhid;
							} else if (gwwd == 08) {
								window.location.href = "./txtl.html?gwwd=" + gwwd + "&cqpcbh=" + cqpcbh +
									"&tmcxfs=" + tmcxfs +
									"&dqys=" + dqys + "&zxwdjb=" + zxwdjb + "&gwwhid=" + gwwhid;
							} else if (gwwd == 03) {
								// 书面理解 A级特殊，先显示读不计时，点击答题展示题目开始计时
								window.location.href = "./written.html?gwwd=" + gwwd + "&cqpcbh=" + cqpcbh +
									"&tmcxfs=" +
									tmcxfs + "&dqys=" + dqys + "&zxwdjb=" + zxwdjb + "&gwwhid=" + gwwhid;
							} else if(gwwd == 06){
								window.location.href = "./tblj.html?gwwd=" + gwwd + "&cqpcbh=" + cqpcbh +
									"&tmcxfs=" +
									tmcxfs + "&dqys=" + dqys + "&zxwdjb=" + zxwdjb + "&gwwhid=" + gwwhid;
							}else {
								// 全跳选择
								window.location.href = "./choice.html?gwwd=" + gwwd + "&cqpcbh=" + cqpcbh +
									"&tmcxfs=" +
									tmcxfs + "&dqys=" + dqys + "&zxwdjb=" + zxwdjb + "&gwwhid=" + gwwhid;
							}
							Load.off();


						}
					},
					{
						text: '否',
						cb: function () {}
					}
				])





			})
			getInfo(gwwhid)
			//    岗位人员列表
			function getInfo(gwwhid) {
				Load.on()
				$.asyncRender({
					url: '/zxwmsgj/grdtwdCx?gwwhid=' + gwwhid + '&time=' + Math.random(),
					type: 'get',
					wrap: '#nav_wrap',
					tem: '#nav_tem',
					pos: 'returnData'
				}).done(function (res) {
					var res = res.returnData;
					if (res.executeResult == 1) {
						Load.off();
					} else {
						$.layerMsg(res.message, '我知道了');
					}
				})
			}
		});

	</script>
</body>

</html>